memory_alphafandomcom-20200223-history
Forum:DPL extension to generate lists
I was playing with the DPL2 extension (http://www.mediawiki.org/wiki/Extension:DynamicPageList2) this evening, and found that it, by now, works well enough to solve some of the problems we were talking about quite some time ago. While discussing some category suggestions, we had two different standpoints: one being the idea that "categories" should, in fact, properly categorize our content in a meaningful way and not just be a shortcut to automatically generate lists - and the other one being the response that the category system is really good at doing exactly that. With the DPL extension, it is now possible to do both. For example, we have a Category:Planets, containing all planets, and a Category:Romulan Neutral Zone, containing everything "in or near the RNZ". What if we wanted to have a list of all planets in the Romulan Neutral Zone? Besides manually creating a list, or using yet another category (which would work against the "proper categorization" bit from above), we now have a third option - use DPL: category=Romulan Neutral Zone category=Planets ordermethod=title namespace= This code, inserted into a page, will create the following listing of all article pages that are in both of the mentioned categories: category=Romulan Neutral Zone category=Planets ordermethod=title namespace= ---- This listing can even be formatted to look like a category, especially useful for longer lists: category=Romulan Neutral Zone category=Planets ordermethod=title mode=category namespace= ---- There are additional options for formatting, sorting, and choosing articles, which can be learned from this page. However, before this really could be used, we'd need to go over our category system again - ideally by identifying "real" basic categories, and those that would better be handled by a DPL listing combining two or more of those basic categories instead. Also, it seems as if some of our existing categories are already too large to be completely presented by a DPL listing (see User:Cid Highwind/Planets, which stops in the middle) - which means that it won't be possible to split that category in subcategories and use a DPL to get a complete overview. -- Cid Highwind 20:21, 11 September 2007 (UTC) :The default limit on the record count in DPL lists is 500 (documented here), which is the record count in your Planets example. There are two extension variables that control this, $wgDPL2MaxResultCount and $wgDPL2AllowUnlimitedResults. We might be able to get Wikia to tweak those for us if necessary. -- Renegade54 20:49, 11 September 2007 (UTC) The latter one seems to be out of the question, at least for the moment, for performance reasons (I already asked about that one, yesterday). Regarding the first one, what limit would we really need? Listing all planets currently doesn't work (we have 892), but that would only be necessary if we created a subcategory Category:Homeworlds (as has been suggested), and then need a DPL to list all planets again by combining those two categories. If we wanted to use this feature to replace the performer subcategories (for example by using Category:Performers and a new Category:TNG), we'd still need to be able to list up to 808 articles (current count of Category:TNG performers). Doing it the other way around (removing the generic "performers" category and recreate it via a DPL union of all former subcategories), we'd need a list of nearly 3,000 articles - which, I think, is out of the question, too. So, a limit of 1,000 would solve even our most extreme problems in that regard. Regarding what other categories might be replaced by this, during a quick scan of the category list I found Category:Starfleet captains and Category:Starfleet admirals (which could be replaced by Category:Starfleet personnel and various rank categories), several of the Category:Earth subcategories etc. -- Cid Highwind 10:28, 12 September 2007 (UTC) ||archive